package com.hhkj.api.sale.model.req;

import com.hhkj.admin.sale.model.dopo.SaleDo;
import com.hhkj.api.sale.common.valid.ApiSaleRegister;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;

/**
 * SaleRegisterReq
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/10/25 14:48
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ApiSaleRegisterReq extends SaleDo {

    /** 验证码 */
    @NotBlank(message = "验证码不能为空", groups = {ApiSaleRegister.class})
    private String captcha;

    /** 上级邀请码 */
    @NotBlank(message = "邀请码不能为空", groups = {ApiSaleRegister.class})
    private String parentNum;

    @NotBlank(message = "密码不能为空", groups = {ApiSaleRegister.class})
    @Override
    public String getPassword() {
        return super.getPassword();
    }

    @NotBlank(message = "姓名不能为空", groups = {ApiSaleRegister.class})
    @Override
    public String getName() {
        return super.getName();
    }

    @NotBlank(message = "手机号不能为空", groups = {ApiSaleRegister.class})
    @Override
    public String getMobile() {
        return super.getMobile();
    }
}

